package edu.citadel.domain;

import edu.citadel.db.ClientDao;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;

import java.util.List;

/**
 * User: jordan
 * Date: 3/10/13
 * Time: 1:39 PM
 */
@Configurable(autowire = Autowire.BY_TYPE)
public class Client extends Contact {

    @Autowired
    private ClientDao clientDao;
    private List<Job> clientJobs;
    private String personalNotes;
    private int clientId;

    public Client() {}

    public int getClientId() {
        return clientId;
    }

    public void setClientId(int clientId) {
        this.clientId = clientId;
    }

    public void save() {
        clientDao.save(this);
    }

    public String getPersonalNotes() {
        return personalNotes;
    }

    public void setPersonalNotes(String personalNotes) {
        this.personalNotes = personalNotes;
    }

    public List<Job> getClientJobs() {
        return clientJobs;
    }

    public void setClientJobs(List<Job> clientJobs) {
        this.clientJobs = clientJobs;
    }

    public void addJob(Job job) {
        this.clientJobs.add(job);
    }

    public void setClientDao(ClientDao clientDao) {
        this.clientDao = clientDao;
    }
}
